﻿
CREATE PROCEDURE [dbo].[proc_Employee_WageTempZj_Update]
	(
		@UserName nvarchar(50),
		@CategoryId int,
		@Price numeric(18,2),
		@Memo nvarchar(50),
		@FsDate DateTime,
		@CreateName nvarchar(50),
		@Id int
	)
AS
	
	Declare @CompanyName nvarchar(50),@EName nvarchar(50),@CategoryName nvarchar(50),@CompanyId int
	
	Select @EName= EName,@CompanyId=CompanyId From Employee Where UserName=@UserName
	Select @CompanyName= CompanyName From Company Where Id=@CompanyId
	Select @CategoryName= Title From Employee_WageTempZj_Category Where Id=@CategoryId
	
	
	Update	Employee_WageTempZj Set
	
	CompanyId=@CompanyId,
	CompanyName=@CompanyName,
	UserName=@UserName,
	EName=@EName,
	CategoryId=@CategoryId,
	CategoryName=@CategoryName,
	Price=@Price,
	Memo=@Memo,
	FsDate=@FsDate,
	CreateName=@CreateName
	Where Id=@Id
	RETURN

